﻿using System.ServiceModel;
using Framework.Wcf.ServiceContract;
using Xunit;

namespace Framework.Wcf.ServiceImplementation.Tests
{
    public class PouetTest
    {
        private readonly IPouet target = new Pouet();
        [Fact]
        public void When_Call_HelloWorld_Then_Toto_is_expected()
        {
            Assert.Equal("sfgdfg", target.HelloWorld().Name);
        }

        [Fact]
        public void When_call_HelloWorldException_Then_FaultException_of_MyFault_expected()
        {
            var e = Assert.Throws<FaultException<MyFault>>(() => target.HelloWorldException());
            Assert.Equal("aie", e.Detail.Info);
        }
    }
}